<template>
  <div v-loading="loading" :style="'height:'+ height">
    <iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" />
  </div>
</template>
<script>
  import axios from 'axios'
  export default {
    name: "新安",
    data() {
      return {
        src: "http://10.20.36.156/ZCWeb/authLogin.aspx?p=Y29kZT1pbmZpbml0JnB3ZD1sbXp6QDEyMw==",
        // http://10.20.36.156/ZCWeb/authLogin.aspx?p=Y29kZT1pbmZpbml0JnB3ZD1sbXp6QDEyMw==
        // src: "",
        height: document.documentElement.clientHeight - 94.5 + "px;",
        loading: true
      };
    },
    created() {
      // this.toFood()
    },
    methods:{
      toFood(){
        var  that=this
        axios.get('/XA/ZCWeb/authLogin.aspx?p=Y29kZT1pbmZpbml0JnB3ZD1sbXp6QDEyMw==',{
        }).then(function(res){
          console.log(res);
        }).catch(function (error) {
          console.log("error");
          that.src="/XA/ZCWeb/AuthHome.aspx"
        });
      }
    },
    mounted: function() {
      setTimeout(() => {
        this.loading = false;
      }, 230);
      const that = this;
      window.onresize = function temp() {
        that.height = document.documentElement.clientHeight - 94.5 + "px;";
      };
    }
  };
</script>
